{include file="common/head"}
<head>
    <title>组织架构管理</title>
    <style>
        a{text-decoration:none;}
    </style>
</head>
<body >
<div class="container-fluid">
    <h2>组织架构管理</h2>
    <table class="table table-sm table-hover table-striped">
        <thead>
            <th>序号</th>
            <th>部门名称</th>
            <th>部门类型</th>
            <th>负责人</th>
            <th>地址</th>
            <th>联系电话</th>
            <th>登记日期</th>
            <th>登记人</th>
            <th>状态</th>
            <th>
                <button type="button" class="btn btn-sm btn-primary">
                    <a href="/index.php/dept/dept_add" alt="新增部门(New department)"><span class="bi-plus-lg" style="color:white;"></span></a>
                </button>
            </th>
        </thead>
        <tbody>
            {foreach $data as $k=>$kv}
            <tr>
                <td>{$k+1}</td>
                <td {if $kv['status']==2} style="color:red;text-decoration: line-through;"{/if}>
                    {if $kv['imgs']==1}
                        <c style="margin-left:20px;"></c>|__
                    {elseif $kv['imgs']==2}
                        <c style="margin-left:50px;"></c>|__
                    {elseif $kv['imgs']==3}
                        <c style="margin-left:80px;"></c>|__
                    {/if}

                    
                    {$kv['name']}
                </td>
                <td>{if $kv['type']==1}平台部门{else}<span class="bi-house-fill"></span>仓库{/if}</td>
                <td>{$kv['user_id_name']}</td>
                <td>{$kv['address']}</td>
                <td>{$kv['tel']}</td>
                <td>{$kv['create_time']}</td>
                <td>{$kv['creater_name']}</td>
                <td>{$kv['status_name']}</td>
                <td>
                    <a href="/index.php/dept/edit/id/{$kv['id']}">
                        <button style="button" class="btn btn-sm btn-info"><span class="bi-pencil"></span></button>
                    </a>
                </td>
            </tr>
            {/foreach}

        </tbody>    
    </table>
</div>

</body>

<script type="text/javascript">
  function resetPwd(uid){
    if(!uid) return false;
      layer.confirm('是否确定重置帐号密码?', {
        btn: ['YES','CANCEL']
      }, function(){
        window.location.href="/index.php/user/resetPwd/id/"+uid;
      }, function(){
        layer.msg("Cancel!");
        return 0;
      });    
  }

</script>


</body>
</html>
